<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>sso</title>
</head>
<body>

<form id="ss" action="/login" method="post">
    用户名:<input id="user"  type="text" name="username"/>
    <br/>
    密码: <input id="password" type="password" name="password"/>
    <input  type="submit" value="提交">

</form>
<button id="ff">00</button>

</body>
<script>

        document.getElementById("ss").onsubmit=function () {
            let user=document.getElementById("user").value;
            let password=document.getElementById("password").value;
            sessionStorage.setItem("zjhm",user)
            sessionStorage.setItem("mm",password)
            alert("确定要进行提交吗")
    }

    document.getElementById("ff").onclick=function (){
        document.getElementById("ff").innerText=sessionStorage.getItem("zjhm")
        /*sessionstorage在当前选项卡是有用的就算，转发跳转什么只要在当前也会进行继承*/
    }




</script>



</html>